//------------------------------------------------------------------------
//
//	CCGameBox is a game development library for iPhone and iPod Touch.
//
//	Licensed under the BSD license, see LICENSE in root for details.
// 
//	Copyright (c) 2009 James Hui (a.k.a. Dr.Watson)
// 
//	For latest updates, please visit http://www.cocoachina.com
//
//------------------------------------------------------------------------

#include "CCTexture.h"
#include "Wrapper.h"


CCTexture::CCTexture(GLuint texId, float width, float height, float texWidth, float texHeight)
{
	mTextureId = texId;
	mImageWidth = width;
	mImageHeight = height;
	mTextureWidth = texWidth;
	mTextureHeight = texHeight;
}


CCTexture::CCTexture()
{
	mTextureId = 0;
	mImageWidth = 0;
	mImageHeight = 0;
	mTextureWidth = 0;
	mTextureHeight = 0;
}


CCTexture::~CCTexture()
{
	if(mTextureId)
		glDeleteTextures(1, &mTextureId);
}
